import request from '@/utils/request'

// 查询培养方案关联学科列表
export function listTrainingManagementSubject(query) {
  return request({
    url: '/trainingManagement/trainingManagementSubject/list',
    method: 'get',
    params: query
  })
}

// 查询培养方案关联学科详细
export function getTrainingManagementSubject(id) {
  return request({
    url: '/trainingManagement/trainingManagementSubject/' + id,
    method: 'get'
  })
}

// 新增培养方案关联学科
export function addTrainingManagementSubject(data) {
  return request({
    url: '/trainingManagement/trainingManagementSubject',
    method: 'post',
    data: data
  })
}

// 修改培养方案关联学科
export function updateTrainingManagementSubject(data) {
  return request({
    url: '/trainingManagement/trainingManagementSubject',
    method: 'put',
    data: data
  })
}

// 删除培养方案关联学科
export function delTrainingManagementSubject(id) {
  return request({
    url: '/trainingManagement/trainingManagementSubject/' + id,
    method: 'delete'
  })
}

//根据培养方案ID获取对应的学科列表
export function listTrainingManagementSubjectByTrainingProgramId(id) {
  return request({
    url: '/trainingManagement/trainingManagementSubject/listByProgramId/' + id,
    method: 'get'
  })
}
